// Common aliases
var $Reader = protobuf.Reader, $Writer = protobuf.Writer, $util = protobuf.util;

// Exported root namespace
var $root = protobuf.roots.creator || (protobuf.roots.creator = $util.global);

$root.BaseResponse = (function() {

    /**
     * Namespace BaseResponse.
     * @exports BaseResponse
     * @namespace
     */
    var BaseResponse = {};

    BaseResponse.Response = (function() {

        /**
         * Properties of a Response.
         * @memberof BaseResponse
         * @interface IResponse
         * @property {number|null} [gameId] Response gameId
         * @property {Uint8Array|null} [data] Response data
         */

        /**
         * Constructs a new Response.
         * @memberof BaseResponse
         * @classdesc Represents a Response.
         * @implements IResponse
         * @constructor
         * @param {BaseResponse.IResponse=} [p] Properties to set
         */
        function Response(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }

        /**
         * Response gameId.
         * @member {number} gameId
         * @memberof BaseResponse.Response
         * @instance
         */
        Response.prototype.gameId = 0;

        /**
         * Response data.
         * @member {Uint8Array} data
         * @memberof BaseResponse.Response
         * @instance
         */
        Response.prototype.data = $util.newBuffer([]);

        /**
         * Encodes the specified Response message. Does not implicitly {@link BaseResponse.Response.verify|verify} messages.
         * @function encode
         * @memberof BaseResponse.Response
         * @static
         * @param {BaseResponse.IResponse} m Response message or plain object to encode
         * @param {protobuf.Writer} [w] Writer to encode to
         * @returns {protobuf.Writer} Writer
         */
        Response.encode = function encode(m, w) {
            if (!w)
                w = $Writer.create();
            if (m.gameId != null && Object.hasOwnProperty.call(m, "gameId"))
                w.uint32(8).int32(m.gameId);
            if (m.data != null && Object.hasOwnProperty.call(m, "data"))
                w.uint32(18).bytes(m.data);
            return w;
        };

        /**
         * Decodes a Response message from the specified reader or buffer.
         * @function decode
         * @memberof BaseResponse.Response
         * @static
         * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
         * @param {number} [l] Message length if known beforehand
         * @returns {BaseResponse.Response} Response
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {protobuf.util.ProtocolError} If required fields are missing
         */
        Response.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.BaseResponse.Response();
            while (r.pos < c) {
                var t = r.uint32();
                switch (t >>> 3) {
                case 1:
                    m.gameId = r.int32();
                    break;
                case 2:
                    m.data = r.bytes();
                    break;
                default:
                    r.skipType(t & 7);
                    break;
                }
            }
            return m;
        };

        return Response;
    })();

    return BaseResponse;
})();

$root.TipCoinResp = (function() {

    /**
     * Properties of a TipCoinResp.
     * @exports ITipCoinResp
     * @interface ITipCoinResp
     * @property {number|null} [tipCoin] TipCoinResp tipCoin
     */

    /**
     * Constructs a new TipCoinResp.
     * @exports TipCoinResp
     * @classdesc Represents a TipCoinResp.
     * @implements ITipCoinResp
     * @constructor
     * @param {ITipCoinResp=} [p] Properties to set
     */
    function TipCoinResp(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * TipCoinResp tipCoin.
     * @member {number} tipCoin
     * @memberof TipCoinResp
     * @instance
     */
    TipCoinResp.prototype.tipCoin = 0;

    /**
     * Encodes the specified TipCoinResp message. Does not implicitly {@link TipCoinResp.verify|verify} messages.
     * @function encode
     * @memberof TipCoinResp
     * @static
     * @param {ITipCoinResp} m TipCoinResp message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    TipCoinResp.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.tipCoin != null && Object.hasOwnProperty.call(m, "tipCoin"))
            w.uint32(9).double(m.tipCoin);
        return w;
    };

    /**
     * Decodes a TipCoinResp message from the specified reader or buffer.
     * @function decode
     * @memberof TipCoinResp
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {TipCoinResp} TipCoinResp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    TipCoinResp.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.TipCoinResp();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.tipCoin = r.double();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return TipCoinResp;
})();

$root.SingleEncryptionCardReq = (function() {

    /**
     * Properties of a SingleEncryptionCardReq.
     * @exports ISingleEncryptionCardReq
     * @interface ISingleEncryptionCardReq
     * @property {number|null} [type] SingleEncryptionCardReq type
     * @property {number|null} [index] SingleEncryptionCardReq index
     */

    /**
     * Constructs a new SingleEncryptionCardReq.
     * @exports SingleEncryptionCardReq
     * @classdesc Represents a SingleEncryptionCardReq.
     * @implements ISingleEncryptionCardReq
     * @constructor
     * @param {ISingleEncryptionCardReq=} [p] Properties to set
     */
    function SingleEncryptionCardReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * SingleEncryptionCardReq type.
     * @member {number} type
     * @memberof SingleEncryptionCardReq
     * @instance
     */
    SingleEncryptionCardReq.prototype.type = 0;

    /**
     * SingleEncryptionCardReq index.
     * @member {number} index
     * @memberof SingleEncryptionCardReq
     * @instance
     */
    SingleEncryptionCardReq.prototype.index = 0;

    /**
     * Encodes the specified SingleEncryptionCardReq message. Does not implicitly {@link SingleEncryptionCardReq.verify|verify} messages.
     * @function encode
     * @memberof SingleEncryptionCardReq
     * @static
     * @param {ISingleEncryptionCardReq} m SingleEncryptionCardReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    SingleEncryptionCardReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.type != null && Object.hasOwnProperty.call(m, "type"))
            w.uint32(8).int32(m.type);
        if (m.index != null && Object.hasOwnProperty.call(m, "index"))
            w.uint32(16).int32(m.index);
        return w;
    };

    /**
     * Decodes a SingleEncryptionCardReq message from the specified reader or buffer.
     * @function decode
     * @memberof SingleEncryptionCardReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {SingleEncryptionCardReq} SingleEncryptionCardReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    SingleEncryptionCardReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.SingleEncryptionCardReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.type = r.int32();
                break;
            case 2:
                m.index = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return SingleEncryptionCardReq;
})();

$root.TotalEncryptionCardResponse = (function() {

    /**
     * Properties of a TotalEncryptionCardResponse.
     * @exports ITotalEncryptionCardResponse
     * @interface ITotalEncryptionCardResponse
     * @property {Array.<ISingleEncryptionCard>|null} [cards] TotalEncryptionCardResponse cards
     * @property {Array.<number>|null} [selfPos] TotalEncryptionCardResponse selfPos
     * @property {Array.<IEncryptionCardPlayerInfo>|null} [encryptionCardPlayerInfo] TotalEncryptionCardResponse encryptionCardPlayerInfo
     */

    /**
     * Constructs a new TotalEncryptionCardResponse.
     * @exports TotalEncryptionCardResponse
     * @classdesc Represents a TotalEncryptionCardResponse.
     * @implements ITotalEncryptionCardResponse
     * @constructor
     * @param {ITotalEncryptionCardResponse=} [p] Properties to set
     */
    function TotalEncryptionCardResponse(p) {
        this.cards = [];
        this.selfPos = [];
        this.encryptionCardPlayerInfo = [];
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * TotalEncryptionCardResponse cards.
     * @member {Array.<ISingleEncryptionCard>} cards
     * @memberof TotalEncryptionCardResponse
     * @instance
     */
    TotalEncryptionCardResponse.prototype.cards = $util.emptyArray;

    /**
     * TotalEncryptionCardResponse selfPos.
     * @member {Array.<number>} selfPos
     * @memberof TotalEncryptionCardResponse
     * @instance
     */
    TotalEncryptionCardResponse.prototype.selfPos = $util.emptyArray;

    /**
     * TotalEncryptionCardResponse encryptionCardPlayerInfo.
     * @member {Array.<IEncryptionCardPlayerInfo>} encryptionCardPlayerInfo
     * @memberof TotalEncryptionCardResponse
     * @instance
     */
    TotalEncryptionCardResponse.prototype.encryptionCardPlayerInfo = $util.emptyArray;

    /**
     * Encodes the specified TotalEncryptionCardResponse message. Does not implicitly {@link TotalEncryptionCardResponse.verify|verify} messages.
     * @function encode
     * @memberof TotalEncryptionCardResponse
     * @static
     * @param {ITotalEncryptionCardResponse} m TotalEncryptionCardResponse message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    TotalEncryptionCardResponse.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.cards != null && m.cards.length) {
            for (var i = 0; i < m.cards.length; ++i)
                $root.SingleEncryptionCard.encode(m.cards[i], w.uint32(10).fork()).ldelim();
        }
        if (m.selfPos != null && m.selfPos.length) {
            w.uint32(18).fork();
            for (var i = 0; i < m.selfPos.length; ++i)
                w.int32(m.selfPos[i]);
            w.ldelim();
        }
        if (m.encryptionCardPlayerInfo != null && m.encryptionCardPlayerInfo.length) {
            for (var i = 0; i < m.encryptionCardPlayerInfo.length; ++i)
                $root.EncryptionCardPlayerInfo.encode(m.encryptionCardPlayerInfo[i], w.uint32(26).fork()).ldelim();
        }
        return w;
    };

    /**
     * Decodes a TotalEncryptionCardResponse message from the specified reader or buffer.
     * @function decode
     * @memberof TotalEncryptionCardResponse
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {TotalEncryptionCardResponse} TotalEncryptionCardResponse
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    TotalEncryptionCardResponse.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.TotalEncryptionCardResponse();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                if (!(m.cards && m.cards.length))
                    m.cards = [];
                m.cards.push($root.SingleEncryptionCard.decode(r, r.uint32()));
                break;
            case 2:
                if (!(m.selfPos && m.selfPos.length))
                    m.selfPos = [];
                if ((t & 7) === 2) {
                    var c2 = r.uint32() + r.pos;
                    while (r.pos < c2)
                        m.selfPos.push(r.int32());
                } else
                    m.selfPos.push(r.int32());
                break;
            case 3:
                if (!(m.encryptionCardPlayerInfo && m.encryptionCardPlayerInfo.length))
                    m.encryptionCardPlayerInfo = [];
                m.encryptionCardPlayerInfo.push($root.EncryptionCardPlayerInfo.decode(r, r.uint32()));
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return TotalEncryptionCardResponse;
})();

$root.EncryptionCardPlayerInfo = (function() {

    /**
     * Properties of an EncryptionCardPlayerInfo.
     * @exports IEncryptionCardPlayerInfo
     * @interface IEncryptionCardPlayerInfo
     * @property {string|null} [name] EncryptionCardPlayerInfo name
     * @property {Array.<number>|null} [pos] EncryptionCardPlayerInfo pos
     */

    /**
     * Constructs a new EncryptionCardPlayerInfo.
     * @exports EncryptionCardPlayerInfo
     * @classdesc Represents an EncryptionCardPlayerInfo.
     * @implements IEncryptionCardPlayerInfo
     * @constructor
     * @param {IEncryptionCardPlayerInfo=} [p] Properties to set
     */
    function EncryptionCardPlayerInfo(p) {
        this.pos = [];
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * EncryptionCardPlayerInfo name.
     * @member {string} name
     * @memberof EncryptionCardPlayerInfo
     * @instance
     */
    EncryptionCardPlayerInfo.prototype.name = "";

    /**
     * EncryptionCardPlayerInfo pos.
     * @member {Array.<number>} pos
     * @memberof EncryptionCardPlayerInfo
     * @instance
     */
    EncryptionCardPlayerInfo.prototype.pos = $util.emptyArray;

    /**
     * Encodes the specified EncryptionCardPlayerInfo message. Does not implicitly {@link EncryptionCardPlayerInfo.verify|verify} messages.
     * @function encode
     * @memberof EncryptionCardPlayerInfo
     * @static
     * @param {IEncryptionCardPlayerInfo} m EncryptionCardPlayerInfo message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    EncryptionCardPlayerInfo.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.name != null && Object.hasOwnProperty.call(m, "name"))
            w.uint32(10).string(m.name);
        if (m.pos != null && m.pos.length) {
            w.uint32(18).fork();
            for (var i = 0; i < m.pos.length; ++i)
                w.int32(m.pos[i]);
            w.ldelim();
        }
        return w;
    };

    /**
     * Decodes an EncryptionCardPlayerInfo message from the specified reader or buffer.
     * @function decode
     * @memberof EncryptionCardPlayerInfo
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {EncryptionCardPlayerInfo} EncryptionCardPlayerInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    EncryptionCardPlayerInfo.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.EncryptionCardPlayerInfo();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.name = r.string();
                break;
            case 2:
                if (!(m.pos && m.pos.length))
                    m.pos = [];
                if ((t & 7) === 2) {
                    var c2 = r.uint32() + r.pos;
                    while (r.pos < c2)
                        m.pos.push(r.int32());
                } else
                    m.pos.push(r.int32());
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return EncryptionCardPlayerInfo;
})();

$root.SingleEncryptionCard = (function() {

    /**
     * Properties of a SingleEncryptionCard.
     * @exports ISingleEncryptionCard
     * @interface ISingleEncryptionCard
     * @property {number|null} [card] SingleEncryptionCard card
     * @property {string|null} [cipher] SingleEncryptionCard cipher
     * @property {string|null} [plaintext] SingleEncryptionCard plaintext
     * @property {string|null} [data] SingleEncryptionCard data
     */

    /**
     * Constructs a new SingleEncryptionCard.
     * @exports SingleEncryptionCard
     * @classdesc Represents a SingleEncryptionCard.
     * @implements ISingleEncryptionCard
     * @constructor
     * @param {ISingleEncryptionCard=} [p] Properties to set
     */
    function SingleEncryptionCard(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * SingleEncryptionCard card.
     * @member {number} card
     * @memberof SingleEncryptionCard
     * @instance
     */
    SingleEncryptionCard.prototype.card = 0;

    /**
     * SingleEncryptionCard cipher.
     * @member {string} cipher
     * @memberof SingleEncryptionCard
     * @instance
     */
    SingleEncryptionCard.prototype.cipher = "";

    /**
     * SingleEncryptionCard plaintext.
     * @member {string} plaintext
     * @memberof SingleEncryptionCard
     * @instance
     */
    SingleEncryptionCard.prototype.plaintext = "";

    /**
     * SingleEncryptionCard data.
     * @member {string} data
     * @memberof SingleEncryptionCard
     * @instance
     */
    SingleEncryptionCard.prototype.data = "";

    /**
     * Encodes the specified SingleEncryptionCard message. Does not implicitly {@link SingleEncryptionCard.verify|verify} messages.
     * @function encode
     * @memberof SingleEncryptionCard
     * @static
     * @param {ISingleEncryptionCard} m SingleEncryptionCard message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    SingleEncryptionCard.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.card != null && Object.hasOwnProperty.call(m, "card"))
            w.uint32(8).int32(m.card);
        if (m.cipher != null && Object.hasOwnProperty.call(m, "cipher"))
            w.uint32(18).string(m.cipher);
        if (m.plaintext != null && Object.hasOwnProperty.call(m, "plaintext"))
            w.uint32(26).string(m.plaintext);
        if (m.data != null && Object.hasOwnProperty.call(m, "data"))
            w.uint32(34).string(m.data);
        return w;
    };

    /**
     * Decodes a SingleEncryptionCard message from the specified reader or buffer.
     * @function decode
     * @memberof SingleEncryptionCard
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {SingleEncryptionCard} SingleEncryptionCard
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    SingleEncryptionCard.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.SingleEncryptionCard();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.card = r.int32();
                break;
            case 2:
                m.cipher = r.string();
                break;
            case 3:
                m.plaintext = r.string();
                break;
            case 4:
                m.data = r.string();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return SingleEncryptionCard;
})();

$root.BaseUserInfo = (function() {

    /**
     * Properties of a BaseUserInfo.
     * @exports IBaseUserInfo
     * @interface IBaseUserInfo
     * @property {number|null} [userId] BaseUserInfo userId
     * @property {string|null} [nickname] BaseUserInfo nickname
     * @property {string|null} [headImg] BaseUserInfo headImg
     * @property {number|null} [sex] BaseUserInfo sex
     * @property {number|null} [coin] BaseUserInfo coin
     */

    /**
     * Constructs a new BaseUserInfo.
     * @exports BaseUserInfo
     * @classdesc Represents a BaseUserInfo.
     * @implements IBaseUserInfo
     * @constructor
     * @param {IBaseUserInfo=} [p] Properties to set
     */
    function BaseUserInfo(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * BaseUserInfo userId.
     * @member {number} userId
     * @memberof BaseUserInfo
     * @instance
     */
    BaseUserInfo.prototype.userId = 0;

    /**
     * BaseUserInfo nickname.
     * @member {string} nickname
     * @memberof BaseUserInfo
     * @instance
     */
    BaseUserInfo.prototype.nickname = "";

    /**
     * BaseUserInfo headImg.
     * @member {string} headImg
     * @memberof BaseUserInfo
     * @instance
     */
    BaseUserInfo.prototype.headImg = "";

    /**
     * BaseUserInfo sex.
     * @member {number} sex
     * @memberof BaseUserInfo
     * @instance
     */
    BaseUserInfo.prototype.sex = 0;

    /**
     * BaseUserInfo coin.
     * @member {number} coin
     * @memberof BaseUserInfo
     * @instance
     */
    BaseUserInfo.prototype.coin = 0;

    /**
     * Encodes the specified BaseUserInfo message. Does not implicitly {@link BaseUserInfo.verify|verify} messages.
     * @function encode
     * @memberof BaseUserInfo
     * @static
     * @param {IBaseUserInfo} m BaseUserInfo message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    BaseUserInfo.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.userId != null && Object.hasOwnProperty.call(m, "userId"))
            w.uint32(8).int32(m.userId);
        if (m.nickname != null && Object.hasOwnProperty.call(m, "nickname"))
            w.uint32(18).string(m.nickname);
        if (m.headImg != null && Object.hasOwnProperty.call(m, "headImg"))
            w.uint32(26).string(m.headImg);
        if (m.sex != null && Object.hasOwnProperty.call(m, "sex"))
            w.uint32(32).int32(m.sex);
        if (m.coin != null && Object.hasOwnProperty.call(m, "coin"))
            w.uint32(41).double(m.coin);
        return w;
    };

    /**
     * Decodes a BaseUserInfo message from the specified reader or buffer.
     * @function decode
     * @memberof BaseUserInfo
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {BaseUserInfo} BaseUserInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    BaseUserInfo.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.BaseUserInfo();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.userId = r.int32();
                break;
            case 2:
                m.nickname = r.string();
                break;
            case 3:
                m.headImg = r.string();
                break;
            case 4:
                m.sex = r.int32();
                break;
            case 5:
                m.coin = r.double();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return BaseUserInfo;
})();

$root.LoginReq = (function() {

    /**
     * Properties of a LoginReq.
     * @exports ILoginReq
     * @interface ILoginReq
     * @property {string|null} [token] LoginReq token
     */

    /**
     * Constructs a new LoginReq.
     * @exports LoginReq
     * @classdesc Represents a LoginReq.
     * @implements ILoginReq
     * @constructor
     * @param {ILoginReq=} [p] Properties to set
     */
    function LoginReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * LoginReq token.
     * @member {string} token
     * @memberof LoginReq
     * @instance
     */
    LoginReq.prototype.token = "";

    /**
     * Encodes the specified LoginReq message. Does not implicitly {@link LoginReq.verify|verify} messages.
     * @function encode
     * @memberof LoginReq
     * @static
     * @param {ILoginReq} m LoginReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    LoginReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.token != null && Object.hasOwnProperty.call(m, "token"))
            w.uint32(10).string(m.token);
        return w;
    };

    /**
     * Decodes a LoginReq message from the specified reader or buffer.
     * @function decode
     * @memberof LoginReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {LoginReq} LoginReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    LoginReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.LoginReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.token = r.string();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return LoginReq;
})();

$root.LoginResp = (function() {

    /**
     * Properties of a LoginResp.
     * @exports ILoginResp
     * @interface ILoginResp
     * @property {string|null} [token] LoginResp token
     * @property {IBaseUserInfo|null} [userInfo] LoginResp userInfo
     * @property {Array.<number>|null} [bets] LoginResp bets
     */

    /**
     * Constructs a new LoginResp.
     * @exports LoginResp
     * @classdesc Represents a LoginResp.
     * @implements ILoginResp
     * @constructor
     * @param {ILoginResp=} [p] Properties to set
     */
    function LoginResp(p) {
        this.bets = [];
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * LoginResp token.
     * @member {string} token
     * @memberof LoginResp
     * @instance
     */
    LoginResp.prototype.token = "";

    /**
     * LoginResp userInfo.
     * @member {IBaseUserInfo|null|undefined} userInfo
     * @memberof LoginResp
     * @instance
     */
    LoginResp.prototype.userInfo = null;

    /**
     * LoginResp bets.
     * @member {Array.<number>} bets
     * @memberof LoginResp
     * @instance
     */
    LoginResp.prototype.bets = $util.emptyArray;

    /**
     * Encodes the specified LoginResp message. Does not implicitly {@link LoginResp.verify|verify} messages.
     * @function encode
     * @memberof LoginResp
     * @static
     * @param {ILoginResp} m LoginResp message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    LoginResp.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.token != null && Object.hasOwnProperty.call(m, "token"))
            w.uint32(10).string(m.token);
        if (m.userInfo != null && Object.hasOwnProperty.call(m, "userInfo"))
            $root.BaseUserInfo.encode(m.userInfo, w.uint32(18).fork()).ldelim();
        if (m.bets != null && m.bets.length) {
            w.uint32(26).fork();
            for (var i = 0; i < m.bets.length; ++i)
                w.int32(m.bets[i]);
            w.ldelim();
        }
        return w;
    };

    /**
     * Decodes a LoginResp message from the specified reader or buffer.
     * @function decode
     * @memberof LoginResp
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {LoginResp} LoginResp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    LoginResp.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.LoginResp();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.token = r.string();
                break;
            case 2:
                m.userInfo = $root.BaseUserInfo.decode(r, r.uint32());
                break;
            case 3:
                if (!(m.bets && m.bets.length))
                    m.bets = [];
                if ((t & 7) === 2) {
                    var c2 = r.uint32() + r.pos;
                    while (r.pos < c2)
                        m.bets.push(r.int32());
                } else
                    m.bets.push(r.int32());
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return LoginResp;
})();

$root.GetRoomListReq = (function() {

    /**
     * Properties of a GetRoomListReq.
     * @exports IGetRoomListReq
     * @interface IGetRoomListReq
     */

    /**
     * Constructs a new GetRoomListReq.
     * @exports GetRoomListReq
     * @classdesc Represents a GetRoomListReq.
     * @implements IGetRoomListReq
     * @constructor
     * @param {IGetRoomListReq=} [p] Properties to set
     */
    function GetRoomListReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * Encodes the specified GetRoomListReq message. Does not implicitly {@link GetRoomListReq.verify|verify} messages.
     * @function encode
     * @memberof GetRoomListReq
     * @static
     * @param {IGetRoomListReq} m GetRoomListReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    GetRoomListReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        return w;
    };

    /**
     * Decodes a GetRoomListReq message from the specified reader or buffer.
     * @function decode
     * @memberof GetRoomListReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {GetRoomListReq} GetRoomListReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    GetRoomListReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.GetRoomListReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return GetRoomListReq;
})();

$root.JoinTableReq = (function() {

    /**
     * Properties of a JoinTableReq.
     * @exports IJoinTableReq
     * @interface IJoinTableReq
     * @property {number|null} [gameNo] JoinTableReq gameNo
     */

    /**
     * Constructs a new JoinTableReq.
     * @exports JoinTableReq
     * @classdesc Represents a JoinTableReq.
     * @implements IJoinTableReq
     * @constructor
     * @param {IJoinTableReq=} [p] Properties to set
     */
    function JoinTableReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * JoinTableReq gameNo.
     * @member {number} gameNo
     * @memberof JoinTableReq
     * @instance
     */
    JoinTableReq.prototype.gameNo = 0;

    /**
     * Encodes the specified JoinTableReq message. Does not implicitly {@link JoinTableReq.verify|verify} messages.
     * @function encode
     * @memberof JoinTableReq
     * @static
     * @param {IJoinTableReq} m JoinTableReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    JoinTableReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.gameNo != null && Object.hasOwnProperty.call(m, "gameNo"))
            w.uint32(8).int32(m.gameNo);
        return w;
    };

    /**
     * Decodes a JoinTableReq message from the specified reader or buffer.
     * @function decode
     * @memberof JoinTableReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {JoinTableReq} JoinTableReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    JoinTableReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.JoinTableReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.gameNo = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return JoinTableReq;
})();

$root.UserReconnectReq = (function() {

    /**
     * Properties of a UserReconnectReq.
     * @exports IUserReconnectReq
     * @interface IUserReconnectReq
     * @property {string|null} [token] UserReconnectReq token
     */

    /**
     * Constructs a new UserReconnectReq.
     * @exports UserReconnectReq
     * @classdesc Represents a UserReconnectReq.
     * @implements IUserReconnectReq
     * @constructor
     * @param {IUserReconnectReq=} [p] Properties to set
     */
    function UserReconnectReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * UserReconnectReq token.
     * @member {string} token
     * @memberof UserReconnectReq
     * @instance
     */
    UserReconnectReq.prototype.token = "";

    /**
     * Encodes the specified UserReconnectReq message. Does not implicitly {@link UserReconnectReq.verify|verify} messages.
     * @function encode
     * @memberof UserReconnectReq
     * @static
     * @param {IUserReconnectReq} m UserReconnectReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    UserReconnectReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.token != null && Object.hasOwnProperty.call(m, "token"))
            w.uint32(10).string(m.token);
        return w;
    };

    /**
     * Decodes a UserReconnectReq message from the specified reader or buffer.
     * @function decode
     * @memberof UserReconnectReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {UserReconnectReq} UserReconnectReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    UserReconnectReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.UserReconnectReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.token = r.string();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return UserReconnectReq;
})();

$root.UserReconnectResp = (function() {

    /**
     * Properties of a UserReconnectResp.
     * @exports IUserReconnectResp
     * @interface IUserReconnectResp
     */

    /**
     * Constructs a new UserReconnectResp.
     * @exports UserReconnectResp
     * @classdesc Represents a UserReconnectResp.
     * @implements IUserReconnectResp
     * @constructor
     * @param {IUserReconnectResp=} [p] Properties to set
     */
    function UserReconnectResp(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * Encodes the specified UserReconnectResp message. Does not implicitly {@link UserReconnectResp.verify|verify} messages.
     * @function encode
     * @memberof UserReconnectResp
     * @static
     * @param {IUserReconnectResp} m UserReconnectResp message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    UserReconnectResp.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        return w;
    };

    /**
     * Decodes a UserReconnectResp message from the specified reader or buffer.
     * @function decode
     * @memberof UserReconnectResp
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {UserReconnectResp} UserReconnectResp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    UserReconnectResp.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.UserReconnectResp();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return UserReconnectResp;
})();

$root.PushReconnectQuit = (function() {

    /**
     * Properties of a PushReconnectQuit.
     * @exports IPushReconnectQuit
     * @interface IPushReconnectQuit
     * @property {number|null} [userId] PushReconnectQuit userId
     */

    /**
     * Constructs a new PushReconnectQuit.
     * @exports PushReconnectQuit
     * @classdesc Represents a PushReconnectQuit.
     * @implements IPushReconnectQuit
     * @constructor
     * @param {IPushReconnectQuit=} [p] Properties to set
     */
    function PushReconnectQuit(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * PushReconnectQuit userId.
     * @member {number} userId
     * @memberof PushReconnectQuit
     * @instance
     */
    PushReconnectQuit.prototype.userId = 0;

    /**
     * Encodes the specified PushReconnectQuit message. Does not implicitly {@link PushReconnectQuit.verify|verify} messages.
     * @function encode
     * @memberof PushReconnectQuit
     * @static
     * @param {IPushReconnectQuit} m PushReconnectQuit message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    PushReconnectQuit.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.userId != null && Object.hasOwnProperty.call(m, "userId"))
            w.uint32(8).int32(m.userId);
        return w;
    };

    /**
     * Decodes a PushReconnectQuit message from the specified reader or buffer.
     * @function decode
     * @memberof PushReconnectQuit
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {PushReconnectQuit} PushReconnectQuit
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    PushReconnectQuit.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.PushReconnectQuit();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.userId = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return PushReconnectQuit;
})();

$root.UserQuitReq = (function() {

    /**
     * Properties of a UserQuitReq.
     * @exports IUserQuitReq
     * @interface IUserQuitReq
     */

    /**
     * Constructs a new UserQuitReq.
     * @exports UserQuitReq
     * @classdesc Represents a UserQuitReq.
     * @implements IUserQuitReq
     * @constructor
     * @param {IUserQuitReq=} [p] Properties to set
     */
    function UserQuitReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * Encodes the specified UserQuitReq message. Does not implicitly {@link UserQuitReq.verify|verify} messages.
     * @function encode
     * @memberof UserQuitReq
     * @static
     * @param {IUserQuitReq} m UserQuitReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    UserQuitReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        return w;
    };

    /**
     * Decodes a UserQuitReq message from the specified reader or buffer.
     * @function decode
     * @memberof UserQuitReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {UserQuitReq} UserQuitReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    UserQuitReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.UserQuitReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return UserQuitReq;
})();

$root.UserQuitResp = (function() {

    /**
     * Properties of a UserQuitResp.
     * @exports IUserQuitResp
     * @interface IUserQuitResp
     * @property {number|null} [userId] UserQuitResp userId
     */

    /**
     * Constructs a new UserQuitResp.
     * @exports UserQuitResp
     * @classdesc Represents a UserQuitResp.
     * @implements IUserQuitResp
     * @constructor
     * @param {IUserQuitResp=} [p] Properties to set
     */
    function UserQuitResp(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * UserQuitResp userId.
     * @member {number} userId
     * @memberof UserQuitResp
     * @instance
     */
    UserQuitResp.prototype.userId = 0;

    /**
     * Encodes the specified UserQuitResp message. Does not implicitly {@link UserQuitResp.verify|verify} messages.
     * @function encode
     * @memberof UserQuitResp
     * @static
     * @param {IUserQuitResp} m UserQuitResp message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    UserQuitResp.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.userId != null && Object.hasOwnProperty.call(m, "userId"))
            w.uint32(8).int32(m.userId);
        return w;
    };

    /**
     * Decodes a UserQuitResp message from the specified reader or buffer.
     * @function decode
     * @memberof UserQuitResp
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {UserQuitResp} UserQuitResp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    UserQuitResp.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.UserQuitResp();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.userId = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return UserQuitResp;
})();

$root.ForcedOffLineReq = (function() {

    /**
     * Properties of a ForcedOffLineReq.
     * @exports IForcedOffLineReq
     * @interface IForcedOffLineReq
     * @property {number|null} [userId] ForcedOffLineReq userId
     */

    /**
     * Constructs a new ForcedOffLineReq.
     * @exports ForcedOffLineReq
     * @classdesc Represents a ForcedOffLineReq.
     * @implements IForcedOffLineReq
     * @constructor
     * @param {IForcedOffLineReq=} [p] Properties to set
     */
    function ForcedOffLineReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * ForcedOffLineReq userId.
     * @member {number} userId
     * @memberof ForcedOffLineReq
     * @instance
     */
    ForcedOffLineReq.prototype.userId = 0;

    /**
     * Encodes the specified ForcedOffLineReq message. Does not implicitly {@link ForcedOffLineReq.verify|verify} messages.
     * @function encode
     * @memberof ForcedOffLineReq
     * @static
     * @param {IForcedOffLineReq} m ForcedOffLineReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    ForcedOffLineReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.userId != null && Object.hasOwnProperty.call(m, "userId"))
            w.uint32(8).int32(m.userId);
        return w;
    };

    /**
     * Decodes a ForcedOffLineReq message from the specified reader or buffer.
     * @function decode
     * @memberof ForcedOffLineReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {ForcedOffLineReq} ForcedOffLineReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    ForcedOffLineReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.ForcedOffLineReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.userId = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return ForcedOffLineReq;
})();

$root.PushForcedOffLine = (function() {

    /**
     * Properties of a PushForcedOffLine.
     * @exports IPushForcedOffLine
     * @interface IPushForcedOffLine
     */

    /**
     * Constructs a new PushForcedOffLine.
     * @exports PushForcedOffLine
     * @classdesc Represents a PushForcedOffLine.
     * @implements IPushForcedOffLine
     * @constructor
     * @param {IPushForcedOffLine=} [p] Properties to set
     */
    function PushForcedOffLine(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * Encodes the specified PushForcedOffLine message. Does not implicitly {@link PushForcedOffLine.verify|verify} messages.
     * @function encode
     * @memberof PushForcedOffLine
     * @static
     * @param {IPushForcedOffLine} m PushForcedOffLine message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    PushForcedOffLine.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        return w;
    };

    /**
     * Decodes a PushForcedOffLine message from the specified reader or buffer.
     * @function decode
     * @memberof PushForcedOffLine
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {PushForcedOffLine} PushForcedOffLine
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    PushForcedOffLine.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.PushForcedOffLine();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return PushForcedOffLine;
})();

$root.UserOnBackReq = (function() {

    /**
     * Properties of a UserOnBackReq.
     * @exports IUserOnBackReq
     * @interface IUserOnBackReq
     * @property {number|null} [onBack] UserOnBackReq onBack
     */

    /**
     * Constructs a new UserOnBackReq.
     * @exports UserOnBackReq
     * @classdesc Represents a UserOnBackReq.
     * @implements IUserOnBackReq
     * @constructor
     * @param {IUserOnBackReq=} [p] Properties to set
     */
    function UserOnBackReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * UserOnBackReq onBack.
     * @member {number} onBack
     * @memberof UserOnBackReq
     * @instance
     */
    UserOnBackReq.prototype.onBack = 0;

    /**
     * Encodes the specified UserOnBackReq message. Does not implicitly {@link UserOnBackReq.verify|verify} messages.
     * @function encode
     * @memberof UserOnBackReq
     * @static
     * @param {IUserOnBackReq} m UserOnBackReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    UserOnBackReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.onBack != null && Object.hasOwnProperty.call(m, "onBack"))
            w.uint32(8).int32(m.onBack);
        return w;
    };

    /**
     * Decodes a UserOnBackReq message from the specified reader or buffer.
     * @function decode
     * @memberof UserOnBackReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {UserOnBackReq} UserOnBackReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    UserOnBackReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.UserOnBackReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.onBack = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return UserOnBackReq;
})();

$root.UserOnBackResp = (function() {

    /**
     * Properties of a UserOnBackResp.
     * @exports IUserOnBackResp
     * @interface IUserOnBackResp
     */

    /**
     * Constructs a new UserOnBackResp.
     * @exports UserOnBackResp
     * @classdesc Represents a UserOnBackResp.
     * @implements IUserOnBackResp
     * @constructor
     * @param {IUserOnBackResp=} [p] Properties to set
     */
    function UserOnBackResp(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * Encodes the specified UserOnBackResp message. Does not implicitly {@link UserOnBackResp.verify|verify} messages.
     * @function encode
     * @memberof UserOnBackResp
     * @static
     * @param {IUserOnBackResp} m UserOnBackResp message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    UserOnBackResp.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        return w;
    };

    /**
     * Decodes a UserOnBackResp message from the specified reader or buffer.
     * @function decode
     * @memberof UserOnBackResp
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {UserOnBackResp} UserOnBackResp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    UserOnBackResp.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.UserOnBackResp();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return UserOnBackResp;
})();

$root.PushRemainTime = (function() {

    /**
     * Properties of a PushRemainTime.
     * @exports IPushRemainTime
     * @interface IPushRemainTime
     * @property {number|null} [time] PushRemainTime time
     */

    /**
     * Constructs a new PushRemainTime.
     * @exports PushRemainTime
     * @classdesc Represents a PushRemainTime.
     * @implements IPushRemainTime
     * @constructor
     * @param {IPushRemainTime=} [p] Properties to set
     */
    function PushRemainTime(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * PushRemainTime time.
     * @member {number} time
     * @memberof PushRemainTime
     * @instance
     */
    PushRemainTime.prototype.time = 0;

    /**
     * Encodes the specified PushRemainTime message. Does not implicitly {@link PushRemainTime.verify|verify} messages.
     * @function encode
     * @memberof PushRemainTime
     * @static
     * @param {IPushRemainTime} m PushRemainTime message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    PushRemainTime.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.time != null && Object.hasOwnProperty.call(m, "time"))
            w.uint32(8).int32(m.time);
        return w;
    };

    /**
     * Decodes a PushRemainTime message from the specified reader or buffer.
     * @function decode
     * @memberof PushRemainTime
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {PushRemainTime} PushRemainTime
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    PushRemainTime.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.PushRemainTime();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.time = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return PushRemainTime;
})();

$root.PushDelayQuit = (function() {

    /**
     * Properties of a PushDelayQuit.
     * @exports IPushDelayQuit
     * @interface IPushDelayQuit
     */

    /**
     * Constructs a new PushDelayQuit.
     * @exports PushDelayQuit
     * @classdesc Represents a PushDelayQuit.
     * @implements IPushDelayQuit
     * @constructor
     * @param {IPushDelayQuit=} [p] Properties to set
     */
    function PushDelayQuit(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * Encodes the specified PushDelayQuit message. Does not implicitly {@link PushDelayQuit.verify|verify} messages.
     * @function encode
     * @memberof PushDelayQuit
     * @static
     * @param {IPushDelayQuit} m PushDelayQuit message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    PushDelayQuit.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        return w;
    };

    /**
     * Decodes a PushDelayQuit message from the specified reader or buffer.
     * @function decode
     * @memberof PushDelayQuit
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {PushDelayQuit} PushDelayQuit
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    PushDelayQuit.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.PushDelayQuit();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return PushDelayQuit;
})();

$root.PushRefreshCoin = (function() {

    /**
     * Properties of a PushRefreshCoin.
     * @exports IPushRefreshCoin
     * @interface IPushRefreshCoin
     * @property {number|null} [userId] PushRefreshCoin userId
     * @property {number|null} [coin] PushRefreshCoin coin
     * @property {number|null} [amount] PushRefreshCoin amount
     */

    /**
     * Constructs a new PushRefreshCoin.
     * @exports PushRefreshCoin
     * @classdesc Represents a PushRefreshCoin.
     * @implements IPushRefreshCoin
     * @constructor
     * @param {IPushRefreshCoin=} [p] Properties to set
     */
    function PushRefreshCoin(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * PushRefreshCoin userId.
     * @member {number} userId
     * @memberof PushRefreshCoin
     * @instance
     */
    PushRefreshCoin.prototype.userId = 0;

    /**
     * PushRefreshCoin coin.
     * @member {number} coin
     * @memberof PushRefreshCoin
     * @instance
     */
    PushRefreshCoin.prototype.coin = 0;

    /**
     * PushRefreshCoin amount.
     * @member {number} amount
     * @memberof PushRefreshCoin
     * @instance
     */
    PushRefreshCoin.prototype.amount = 0;

    /**
     * Encodes the specified PushRefreshCoin message. Does not implicitly {@link PushRefreshCoin.verify|verify} messages.
     * @function encode
     * @memberof PushRefreshCoin
     * @static
     * @param {IPushRefreshCoin} m PushRefreshCoin message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    PushRefreshCoin.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.userId != null && Object.hasOwnProperty.call(m, "userId"))
            w.uint32(8).int32(m.userId);
        if (m.coin != null && Object.hasOwnProperty.call(m, "coin"))
            w.uint32(17).double(m.coin);
        if (m.amount != null && Object.hasOwnProperty.call(m, "amount"))
            w.uint32(25).double(m.amount);
        return w;
    };

    /**
     * Decodes a PushRefreshCoin message from the specified reader or buffer.
     * @function decode
     * @memberof PushRefreshCoin
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {PushRefreshCoin} PushRefreshCoin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    PushRefreshCoin.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.PushRefreshCoin();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.userId = r.int32();
                break;
            case 2:
                m.coin = r.double();
                break;
            case 3:
                m.amount = r.double();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return PushRefreshCoin;
})();

$root.PushGameNotice = (function() {

    /**
     * Properties of a PushGameNotice.
     * @exports IPushGameNotice
     * @interface IPushGameNotice
     * @property {number|null} [gameId] PushGameNotice gameId
     * @property {number|null} [gameNo] PushGameNotice gameNo
     * @property {string|null} [nickName] PushGameNotice nickName
     * @property {number|null} [coin] PushGameNotice coin
     * @property {number|null} [noticeId] PushGameNotice noticeId
     */

    /**
     * Constructs a new PushGameNotice.
     * @exports PushGameNotice
     * @classdesc Represents a PushGameNotice.
     * @implements IPushGameNotice
     * @constructor
     * @param {IPushGameNotice=} [p] Properties to set
     */
    function PushGameNotice(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * PushGameNotice gameId.
     * @member {number} gameId
     * @memberof PushGameNotice
     * @instance
     */
    PushGameNotice.prototype.gameId = 0;

    /**
     * PushGameNotice gameNo.
     * @member {number} gameNo
     * @memberof PushGameNotice
     * @instance
     */
    PushGameNotice.prototype.gameNo = 0;

    /**
     * PushGameNotice nickName.
     * @member {string} nickName
     * @memberof PushGameNotice
     * @instance
     */
    PushGameNotice.prototype.nickName = "";

    /**
     * PushGameNotice coin.
     * @member {number} coin
     * @memberof PushGameNotice
     * @instance
     */
    PushGameNotice.prototype.coin = 0;

    /**
     * PushGameNotice noticeId.
     * @member {number} noticeId
     * @memberof PushGameNotice
     * @instance
     */
    PushGameNotice.prototype.noticeId = 0;

    /**
     * Encodes the specified PushGameNotice message. Does not implicitly {@link PushGameNotice.verify|verify} messages.
     * @function encode
     * @memberof PushGameNotice
     * @static
     * @param {IPushGameNotice} m PushGameNotice message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    PushGameNotice.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.gameId != null && Object.hasOwnProperty.call(m, "gameId"))
            w.uint32(8).int32(m.gameId);
        if (m.gameNo != null && Object.hasOwnProperty.call(m, "gameNo"))
            w.uint32(16).int32(m.gameNo);
        if (m.nickName != null && Object.hasOwnProperty.call(m, "nickName"))
            w.uint32(26).string(m.nickName);
        if (m.coin != null && Object.hasOwnProperty.call(m, "coin"))
            w.uint32(33).double(m.coin);
        if (m.noticeId != null && Object.hasOwnProperty.call(m, "noticeId"))
            w.uint32(40).int32(m.noticeId);
        return w;
    };

    /**
     * Decodes a PushGameNotice message from the specified reader or buffer.
     * @function decode
     * @memberof PushGameNotice
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {PushGameNotice} PushGameNotice
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    PushGameNotice.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.PushGameNotice();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.gameId = r.int32();
                break;
            case 2:
                m.gameNo = r.int32();
                break;
            case 3:
                m.nickName = r.string();
                break;
            case 4:
                m.coin = r.double();
                break;
            case 5:
                m.noticeId = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return PushGameNotice;
})();

$root.PushAiShow = (function() {

    /**
     * Properties of a PushAiShow.
     * @exports IPushAiShow
     * @interface IPushAiShow
     * @property {Array.<number>|null} [showPos] PushAiShow showPos
     */

    /**
     * Constructs a new PushAiShow.
     * @exports PushAiShow
     * @classdesc Represents a PushAiShow.
     * @implements IPushAiShow
     * @constructor
     * @param {IPushAiShow=} [p] Properties to set
     */
    function PushAiShow(p) {
        this.showPos = [];
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * PushAiShow showPos.
     * @member {Array.<number>} showPos
     * @memberof PushAiShow
     * @instance
     */
    PushAiShow.prototype.showPos = $util.emptyArray;

    /**
     * Encodes the specified PushAiShow message. Does not implicitly {@link PushAiShow.verify|verify} messages.
     * @function encode
     * @memberof PushAiShow
     * @static
     * @param {IPushAiShow} m PushAiShow message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    PushAiShow.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.showPos != null && m.showPos.length) {
            w.uint32(10).fork();
            for (var i = 0; i < m.showPos.length; ++i)
                w.int32(m.showPos[i]);
            w.ldelim();
        }
        return w;
    };

    /**
     * Decodes a PushAiShow message from the specified reader or buffer.
     * @function decode
     * @memberof PushAiShow
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {PushAiShow} PushAiShow
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    PushAiShow.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.PushAiShow();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                if (!(m.showPos && m.showPos.length))
                    m.showPos = [];
                if ((t & 7) === 2) {
                    var c2 = r.uint32() + r.pos;
                    while (r.pos < c2)
                        m.showPos.push(r.int32());
                } else
                    m.showPos.push(r.int32());
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return PushAiShow;
})();

$root.BankerResendCardReq = (function() {

    /**
     * Properties of a BankerResendCardReq.
     * @exports IBankerResendCardReq
     * @interface IBankerResendCardReq
     * @property {number|null} [flag] BankerResendCardReq flag
     */

    /**
     * Constructs a new BankerResendCardReq.
     * @exports BankerResendCardReq
     * @classdesc Represents a BankerResendCardReq.
     * @implements IBankerResendCardReq
     * @constructor
     * @param {IBankerResendCardReq=} [p] Properties to set
     */
    function BankerResendCardReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * BankerResendCardReq flag.
     * @member {number} flag
     * @memberof BankerResendCardReq
     * @instance
     */
    BankerResendCardReq.prototype.flag = 0;

    /**
     * Encodes the specified BankerResendCardReq message. Does not implicitly {@link BankerResendCardReq.verify|verify} messages.
     * @function encode
     * @memberof BankerResendCardReq
     * @static
     * @param {IBankerResendCardReq} m BankerResendCardReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    BankerResendCardReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.flag != null && Object.hasOwnProperty.call(m, "flag"))
            w.uint32(8).int32(m.flag);
        return w;
    };

    /**
     * Decodes a BankerResendCardReq message from the specified reader or buffer.
     * @function decode
     * @memberof BankerResendCardReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {BankerResendCardReq} BankerResendCardReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    BankerResendCardReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.BankerResendCardReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.flag = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return BankerResendCardReq;
})();

$root.GrantCoinReq = (function() {

    /**
     * Properties of a GrantCoinReq.
     * @exports IGrantCoinReq
     * @interface IGrantCoinReq
     * @property {number|null} [index] GrantCoinReq index
     */

    /**
     * Constructs a new GrantCoinReq.
     * @exports GrantCoinReq
     * @classdesc Represents a GrantCoinReq.
     * @implements IGrantCoinReq
     * @constructor
     * @param {IGrantCoinReq=} [p] Properties to set
     */
    function GrantCoinReq(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * GrantCoinReq index.
     * @member {number} index
     * @memberof GrantCoinReq
     * @instance
     */
    GrantCoinReq.prototype.index = 0;

    /**
     * Encodes the specified GrantCoinReq message. Does not implicitly {@link GrantCoinReq.verify|verify} messages.
     * @function encode
     * @memberof GrantCoinReq
     * @static
     * @param {IGrantCoinReq} m GrantCoinReq message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    GrantCoinReq.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.index != null && Object.hasOwnProperty.call(m, "index"))
            w.uint32(8).int32(m.index);
        return w;
    };

    /**
     * Decodes a GrantCoinReq message from the specified reader or buffer.
     * @function decode
     * @memberof GrantCoinReq
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {GrantCoinReq} GrantCoinReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    GrantCoinReq.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.GrantCoinReq();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.index = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return GrantCoinReq;
})();

$root.GrantCoinResp = (function() {

    /**
     * Properties of a GrantCoinResp.
     * @exports IGrantCoinResp
     * @interface IGrantCoinResp
     * @property {number|null} [userId] GrantCoinResp userId
     * @property {number|null} [coin] GrantCoinResp coin
     */

    /**
     * Constructs a new GrantCoinResp.
     * @exports GrantCoinResp
     * @classdesc Represents a GrantCoinResp.
     * @implements IGrantCoinResp
     * @constructor
     * @param {IGrantCoinResp=} [p] Properties to set
     */
    function GrantCoinResp(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * GrantCoinResp userId.
     * @member {number} userId
     * @memberof GrantCoinResp
     * @instance
     */
    GrantCoinResp.prototype.userId = 0;

    /**
     * GrantCoinResp coin.
     * @member {number} coin
     * @memberof GrantCoinResp
     * @instance
     */
    GrantCoinResp.prototype.coin = 0;

    /**
     * Encodes the specified GrantCoinResp message. Does not implicitly {@link GrantCoinResp.verify|verify} messages.
     * @function encode
     * @memberof GrantCoinResp
     * @static
     * @param {IGrantCoinResp} m GrantCoinResp message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    GrantCoinResp.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.userId != null && Object.hasOwnProperty.call(m, "userId"))
            w.uint32(8).int32(m.userId);
        if (m.coin != null && Object.hasOwnProperty.call(m, "coin"))
            w.uint32(16).int32(m.coin);
        return w;
    };

    /**
     * Decodes a GrantCoinResp message from the specified reader or buffer.
     * @function decode
     * @memberof GrantCoinResp
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {GrantCoinResp} GrantCoinResp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    GrantCoinResp.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.GrantCoinResp();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.userId = r.int32();
                break;
            case 2:
                m.coin = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return GrantCoinResp;
})();

$root.PushGrantCoin = (function() {

    /**
     * Properties of a PushGrantCoin.
     * @exports IPushGrantCoin
     * @interface IPushGrantCoin
     * @property {Array.<IGrantAwards>|null} [awards] PushGrantCoin awards
     */

    /**
     * Constructs a new PushGrantCoin.
     * @exports PushGrantCoin
     * @classdesc Represents a PushGrantCoin.
     * @implements IPushGrantCoin
     * @constructor
     * @param {IPushGrantCoin=} [p] Properties to set
     */
    function PushGrantCoin(p) {
        this.awards = [];
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * PushGrantCoin awards.
     * @member {Array.<IGrantAwards>} awards
     * @memberof PushGrantCoin
     * @instance
     */
    PushGrantCoin.prototype.awards = $util.emptyArray;

    /**
     * Encodes the specified PushGrantCoin message. Does not implicitly {@link PushGrantCoin.verify|verify} messages.
     * @function encode
     * @memberof PushGrantCoin
     * @static
     * @param {IPushGrantCoin} m PushGrantCoin message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    PushGrantCoin.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.awards != null && m.awards.length) {
            for (var i = 0; i < m.awards.length; ++i)
                $root.GrantAwards.encode(m.awards[i], w.uint32(10).fork()).ldelim();
        }
        return w;
    };

    /**
     * Decodes a PushGrantCoin message from the specified reader or buffer.
     * @function decode
     * @memberof PushGrantCoin
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {PushGrantCoin} PushGrantCoin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    PushGrantCoin.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.PushGrantCoin();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                if (!(m.awards && m.awards.length))
                    m.awards = [];
                m.awards.push($root.GrantAwards.decode(r, r.uint32()));
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return PushGrantCoin;
})();

$root.GrantAwards = (function() {

    /**
     * Properties of a GrantAwards.
     * @exports IGrantAwards
     * @interface IGrantAwards
     * @property {number|null} [award] GrantAwards award
     * @property {number|null} [userId] GrantAwards userId
     */

    /**
     * Constructs a new GrantAwards.
     * @exports GrantAwards
     * @classdesc Represents a GrantAwards.
     * @implements IGrantAwards
     * @constructor
     * @param {IGrantAwards=} [p] Properties to set
     */
    function GrantAwards(p) {
        if (p)
            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                if (p[ks[i]] != null)
                    this[ks[i]] = p[ks[i]];
    }

    /**
     * GrantAwards award.
     * @member {number} award
     * @memberof GrantAwards
     * @instance
     */
    GrantAwards.prototype.award = 0;

    /**
     * GrantAwards userId.
     * @member {number} userId
     * @memberof GrantAwards
     * @instance
     */
    GrantAwards.prototype.userId = 0;

    /**
     * Encodes the specified GrantAwards message. Does not implicitly {@link GrantAwards.verify|verify} messages.
     * @function encode
     * @memberof GrantAwards
     * @static
     * @param {IGrantAwards} m GrantAwards message or plain object to encode
     * @param {protobuf.Writer} [w] Writer to encode to
     * @returns {protobuf.Writer} Writer
     */
    GrantAwards.encode = function encode(m, w) {
        if (!w)
            w = $Writer.create();
        if (m.award != null && Object.hasOwnProperty.call(m, "award"))
            w.uint32(9).double(m.award);
        if (m.userId != null && Object.hasOwnProperty.call(m, "userId"))
            w.uint32(16).int32(m.userId);
        return w;
    };

    /**
     * Decodes a GrantAwards message from the specified reader or buffer.
     * @function decode
     * @memberof GrantAwards
     * @static
     * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
     * @param {number} [l] Message length if known beforehand
     * @returns {GrantAwards} GrantAwards
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {protobuf.util.ProtocolError} If required fields are missing
     */
    GrantAwards.decode = function decode(r, l) {
        if (!(r instanceof $Reader))
            r = $Reader.create(r);
        var c = l === undefined ? r.len : r.pos + l, m = new $root.GrantAwards();
        while (r.pos < c) {
            var t = r.uint32();
            switch (t >>> 3) {
            case 1:
                m.award = r.double();
                break;
            case 2:
                m.userId = r.int32();
                break;
            default:
                r.skipType(t & 7);
                break;
            }
        }
        return m;
    };

    return GrantAwards;
})();